# # _*_coding:utf-8_*_
# __author__ = 'gerry'
#
#
# def sayhi(*args):
#     print(args)
#
#
# sayhi('arg1', 'g2', 'g3')
#
#
# def sayhi1(**kwargs):
#     print(kwargs)
#     if kwargs.has_key("name"):
#         print kwargs["name"]
#     else:
#         print("please entry the number:")
#
#
# sayhi1(name='alex', age='30', job='IT')
#
#
# def f(x):
#     return x ** 2
#
#
# g = lambda x: x ** 2
#
# print g(4)
#
# print map(lambda x: x ** 2, range(10))
#
# dict1 = {
#     9: 2,
#     4: 3,
#     'a': 'b',
#     'c': 'd'
# }
#
# print(dict1)
#
# print sorted(dict1.items(), key=lambda x: x[0])
# print sorted(dict1.items(), value=lambda x: x[1])
#
#
# import time
# def run():
#     print("test1")
#     yield 1
#     time.sleep(1)
#     print("test2")
#     yield 2
#     time.sleep(1)
#     print("test3")
#     yield 3
#     time.sleep(1)
#     yield 4
#     print("test4")
#     time.sleep(1)
#     yield 5
#     print("test5")
#     yield 6
#     time.sleep(1)
#     print("test6")
#     yield 7
#     time.sleep(1)
#
# task = run()
# task.next()
# print("-------do sth else--------------")
# task.next()
# print("-------do sth else--------------")
# task.next()
# print("-------do sth else--------------")
# task.next()
# print("-------do sth else--------------")
# task.next()
# print("-------do sth else--------------")
# task.next()




print "my name is {name}".format(name="gerry")

a = [0,1, 3, 4, 5]
b = iter(a)
c = tuple(a)
print b.next()

#print [i for i in c if i<50]

print filter(lambda x:x*x,a)
print(globals())

print(reduce(lambda x,y:x+y,range(101)))

























